package com.cn.por.util;

import java.math.BigDecimal;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;

/**
 * 
 * @author 26983
 *
 */

public class StringUtils {
	
	private String a;
	

	public String getA() {
		return a;
	}


	public void setA(String a) {
		this.a = a;
	}


	public static void main(String[] args) {
		
		
		Double  a =10D;
		Double b =3D;
		System.out.println(Math.ceil(a/b));
		
		Charset charset=Charset.forName("UTF-8");
		ByteBuffer byteBuffer=charset.encode("aa");//why string?
		byte[] ba=byteBuffer.array();//转化成byte[]
		CharBuffer charBuffer=charset.decode(byteBuffer);
		String dd = charBuffer.toString();
		
		String aa = "aa";
		
		System.out.println(dd == aa);
		char[] ca=charBuffer.array();//转化成char[]

		System.out.println(new BigDecimal(0.236).setScale(2, BigDecimal.ROUND_HALF_UP));
	}

}
